package com.xuxin.baby.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.xuxin.baby.R;
import com.xuxin.baby.bean.ChildGreatBean;
import com.xuxin.baby.utils.BaseUtils;

import org.jetbrains.annotations.NotNull;

/**
 * Created by xu_xin
 * Created on 2020.09.09 0009
 * 宝宝大事记
 */
public class ChildGreatAdapter extends BaseQuickAdapter<ChildGreatBean.ResultBean.ItemsBean, BaseViewHolder> {

    public ChildGreatAdapter() {
        super(R.layout.item_child_data);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder holder, ChildGreatBean.ResultBean.ItemsBean itemsBean) {
        holder.setText(R.id.item_child_data_name, itemsBean.getEventContent());
        holder.setText(R.id.item_child_data_time, BaseUtils.getTime(itemsBean.getEventDate()));
    }
}